package day12;

import java.util.InputMismatchException;
import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class Divide3 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        System.out.println("请输2个数字：");
        try {
            int k = in.nextInt();
            int b = in.nextInt();
            int c = k / b;
            System.out.println("商是" + c);
        } catch (InputMismatchException e) {
            System.err.println("出现了输入错误" + e);
            e.printStackTrace();

        } catch (ArithmeticException e) {
            System.err.println("出现了除零错误：" + e);
            e.printStackTrace();
        } catch (Exception e) {
            System.out.println("出现了错误：" + e);
            e.printStackTrace();
        } finally {
            System.out.println("除法结束了。。。");
        }


    }
}
